<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../layui/dist/css/layui.css"/>
    <style>
        .layui-nav .layui-nav-child dd:hover ul{
            display: block;
            position: absolute;
            top:0px;
            left:200px;
            background: #000000;
            box-shadow: 0 2px 4px rgba(0,0,0,1);
            border: 1px solid #D2D2D2;
            border-radius: 2px;
        }
        .layui-nav .layui-nav-child dd ul {display: none;}
        /*.layui-nav .layui-nav-child dd ul a:hover{background: #F0F0F0;}*/
    </style>
</head>
<body>

<ul class="layui-nav layui-nav-tree layui-inline" lay-filter="demo" style="margin-right: 10px;">
    <li class="layui-nav-item layui-nav-itemed">
        <a href="javascript:;">默认展开</a>
        <dl class="layui-nav-child">
            <dd><a href="javascript:;">选项一</a>
                <ul>
                    <li><a href="#">11</a> </li>
                    <li><a href="#">11</a> </li>
                    <li><a href="#">11</a> </li>
                    <li><a href="#">11</a> </li>
                </ul>
            </dd>
            <dd><a href="javascript:;">选项二</a></dd>
            <dd><a href="javascript:;">选项三</a></dd>
            <dd><a href="">跳转项</a></dd>
        </dl>
    </li>
    <li class="layui-nav-item">
        <a href="javascript:;">解决方案</a>
        <dl class="layui-nav-child">
            <dd><a href="">移动模块</a></dd>
            <dd><a href="">后台模版</a></dd>
            <dd><a href="">电商平台</a></dd>
        </dl>
    </li>
    <li class="layui-nav-item"><a href="">云市场</a></li>
    <li class="layui-nav-item"><a href="">社区</a></li>
</ul>

<script src="../layui/dist/layui.js" type="text/javascript" charset="utf-8"></script>
<script>
    layui.use(['element','layer'], function(){
        var element = layui.element
            ,layer = layui.layer; //导航的hover效果、二级菜单等功能，需要依赖element模块

        //监听导航点击
        element.on('nav(demo)', function(elem){
            //console.log(elem)
            layer.msg(elem.text());
        });
    });
</script>
</body>
</html>
